{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<script type="text/javascript">
	window.onload=function()
	{
		load_preset_value_row();
		$("select[name='input_type']").bind("change",function(){
			load_preset_value_row();
		});
	}
	function load_preset_value_row()
	{
		var input_type = $("select[name='input_type']").val();
		if(input_type==0)
		{
			$("#preset_value_row").hide();
		}
		else
		{
			$("#preset_value_row").show();
		}
	}
</script>
<div class="main">
<div class="main_title">[{$goods_type_info.name}] {%EDIT_ATTR} <a href="{:u("GoodsTypeAttr/index",array("goods_type_id"=>$goods_type_info['id']))}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">{%NAME}:</td>
		<td class="item_input"><input type="text" class="textbox require" name="name" value="{$vo.name}" /></td>
	</tr>
	<tr>
		<td class="item_title">{%INPUT_TYPE}:</td>
		<td class="item_input">
			<select name="input_type">
				<option value="0" <if condition="$vo['input_type'] eq 0">selected="selected"</if>>{%INPUT_TYPE_0}</option>
				<option value="1" <if condition="$vo['input_type'] eq 1">selected="selected"</if>>{%INPUT_TYPE_1}</option>
			</select>
		</td>
	</tr>	
	<tr style="display:none;" id="preset_value_row">
		<td class="item_title">{%PRESET_VALUE}:</td>
		<td class="item_input"><textarea class="textarea" name="preset_value" >{$vo.preset_value}</textarea></td>
	</tr>	
	
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="id" value="{$vo.id}" />
			<input type="hidden" name="goods_type_id" value="{$goods_type_info.id}" />
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="GoodsTypeAttr" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%EDIT}" />
			<input type="reset" class="button" value="{%RESET}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>
<include file="Public:footer" />